package com.icarsaas.saas.tenant.system.model;

import com.icarsaas.saas.component.base.DataEntity;
import lombok.Data;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.*;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;
import java.io.Serializable;

/**
 * 消息实体
 */
@EntityListeners(AuditingEntityListener.class)
@Data @Entity @Table(name = "sys_message_user")
@DynamicInsert @DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@org.hibernate.annotations.Table(appliesTo = "sys_message_user",comment="用户消息处理实体")
public class MessageUser extends DataEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(generator="system-uuid")
	@GenericGenerator(name="system-uuid", strategy = "org.hibernate.id.UUIDGenerator")
	@Column(name = "id", nullable = false, insertable = true, updatable = true, length = 36)
	private String id;
	@Column(columnDefinition="varchar(36) COMMENT '关联消息主表id'")
	private String refId;
	@Column(columnDefinition="varchar(36) COMMENT '用户id'")
	private String user_id;
	@Column(columnDefinition="varchar(256) COMMENT '处理状态'")
	private String status;

}
